package com.yjd.comm.borrow.service;

import java.util.Map;

import com.yjd.comm.base.model.PagerModel;
import com.yjd.comm.base.service.IBaseService;
import com.yjd.comm.borrow.model.CreditorTransferModel;

/**
 * <b>description</b>：债权转让记录业务接口<br>
 * <b>time</b>：2014-11-17 11:01:21 <br>
 * <b>author</b>： ready likun_557@163.com
 */
public interface ICreditorTransferService extends IBaseService {
	/**
	 * 插入
	 * 
	 * @param model
	 * @return
	 * @throws Exception
	 */
	public CreditorTransferModel insert(CreditorTransferModel model)
			throws Exception;

	/**
	 * 更新,大于等于1表示成功，其他失败
	 * 
	 * @param model
	 * @return
	 * @throws Exception
	 */
	public int update(CreditorTransferModel model) throws Exception;

	/**
	 * 根据id删除,大于等于1表示成功，其他失败
	 * 
	 * @param id
	 * @return
	 * @throws Exception
	 */
	public int delete(Long id) throws Exception;

	/**
	 * 过期债权的恢复
	 * 
	 * @param model
	 * @return
	 * @throws Exception
	 */
	public void updateOldCreditor() throws Exception;

	/**
	 * 统计
	 * 
	 * @param paramMap
	 * @param write
	 * @return
	 * @throws Exception
	 */
	public double transferSum(Map<Object, Object> paramMap, String string)
			throws Exception;

	/**
	 * 删除数据
	 * 
	 * @param paramMap
	 * @return
	 * @throws Exception
	 */
	@SuppressWarnings("rawtypes")
	public int deleteByMap(Map paramMap) throws Exception;

	/**
	 * 根据map更新债权转让记录的信息
	 * 
	 * @param paramMap
	 * @return
	 * @throws Exception
	 */
	@SuppressWarnings("rawtypes")
	public int updateByMap(Map paramMap) throws Exception;
	
	PagerModel getMyPageModel(Map paramMap) throws Exception;
	
	@SuppressWarnings("rawtypes")
    public Double getSumCreditorPiceByUserId(Map paramMap)  throws Exception;
}
